package com.csu54sher.basereservation.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 预约表
 * </p>
 *
 * @author csu54sher
 * @since 2025-10-19
 */
@Getter
@Setter
@TableName("reservation")
public class Reservation extends Model<Reservation> {

    private static final long serialVersionUID = 1L;

    /**
     * 预约ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 预约的基地
     */
    @TableField("base_id")
    private Integer baseId;

    /**
     * 预约用户的ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 该预约记录的ID
     */
    @TableField("reservable_time_id")
    private String reservableTimeId;

    /**
     * 创建该预约的时间
     */
    @TableField("create_at")
    private LocalDateTime createAt;

    /**
     * 更新预约的时间
     */
    @TableField("update_at")
    private LocalDateTime updateAt;

    /**
     * 该预约是否完成参观(提交活动记录后视为完成)，是否完成评价(完成评价之后就完成了全部任务)
     */
    @TableField("status")
    private String status;

    /**
     * 参与人数
     */
    @TableField("participants_count")
    private Integer participantsCount;

    /**
     * 备注内容，可选
     */
    @TableField("remark")
    private String remark;

    public static final String ID = "id";

    public static final String BASE_ID = "base_id";

    public static final String USER_ID = "user_id";

    public static final String RESERVABLE_TIME_ID = "reservable_time_id";

    public static final String CREATE_AT = "create_at";

    public static final String UPDATE_AT = "update_at";

    public static final String STATUS = "status";

    public static final String PARTICIPANTS_COUNT = "participants_count";

    public static final String REMARK = "remark";

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
